<?php
$sql = "SELECT * FROM ".$base_obj->CLASSIFIEDS_ADS." WHERE id='".$cat_id."'";
$res = $base_obj->exec_query($sql);
$data = $base_obj->fetch_row($res);

for($i=1;$i<7;$i++) {
	$image[$i] = 'uploads/adimages/'.$data['TempImage'.$i];
	
	list($img_width,$img_height,$file) = @getimagesize($image[$i]);
			
	if((file_exists($image[$i]) and ($img_width == 0 or $img_height == 0)) or !file_exists($image[$i])) {
		$image[$i] = 'images/noimage.jpg';
	}
}
?>
<script src="js/tool_tip_image.js" type="text/javascript"></script>
<style>
#ImageBox {
	margin-top:20px;
}
h1{
	font-size:180%;
	font-weight:normal;
	color:#555;
}
h2{
	clear:both;
	font-size:160%;
	font-weight:normal;
	color:#555;
	margin:0;
	padding:.5em 0;
}
a{
	text-decoration:none;
	color:#f30;	
}
p{
	clear:both;
	margin:0;
	padding:.5em 0;
}
pre{
	display:block;
	font:100% "Courier New", Courier, monospace;
	padding:10px;
	border:1px solid #bae2f0;
	background:#e3f4f9;	
	margin:.5em 0;
	overflow:auto;
	width:800px;
}

img{border:none;}
#ImageBox ul,li{
	margin:0;
	padding:0;
}
#ImageBox li {
	border:1px solid #C3C3C3;
	display:inline;
	float:left;
	height:131px;
	list-style:none outside none;
	margin:10px;
	padding:4px;
}



/*  */

#preview{
	position:absolute;
	border:1px solid #ccc;
	background:#333;
	padding:5px;
	display:none;
	color:#fff;
	}

/*  */
</style>

  <!-- Begin contentwarpLeft -->
  <!-- End contentwarpLeft -->
  <!-- Begin contentwarpMiddle -->
<div class="contentwarp"  style="min-height:1000px;">
  <div class="contentwarpMiddle">
    <div id="inner_content" class="clearfix cbb">
      <h1 class="titles" style="text-transform:uppercase; border-bottom:none; margin-top:20px; padding-left:10px;"><?php echo $base_obj->getClassifieidsSubCategoryName($cat_id)?></h1>
      <div class="i3">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="33%" rowspan="10" align="center" valign="top">
    <img style="width: 180px; height: 135px;" src="thumb.php?file=<?php echo $image[1];?>&sizex=180&sizey=130">
    </td>
    <td colspan="2" align="left" valign="middle">
    <p class="titles" style="font-size:16px; margin:0px;"><?php echo stripslashes(strtoupper($data['Item']));?> </p></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td width="15%" height="30" align="left" valign="middle">Location</td>
    <td width="52%" align="left" valign="middle"><strong><?php echo $data['City']?></strong></td>
  </tr>
  <tr>
    <td height="30" align="left" valign="middle">Date Posted</td>
    <td align="left" valign="middle"><strong><?php echo $data['InsertedDate']?></strong></td>
  </tr>
  <tr>
    <td height="30" align="left" valign="middle">Phone</td>
    <td align="left" valign="middle"><strong><?php echo $data['Phone']?></strong></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="middle">&nbsp;</td>
  </tr>
        </table>
      </div>
      <div style="clear:both"></div>
      <div id="ImageBox">
      	<ul>
        <?php
        for($i=1;$i<7;$i++) {
			if($data['TempImage'.$i] != "") {
		?>
		<li><a href="thumb.php?file=<?php echo $image[$i];?>&sizex=500&sizey=400" class="preview" title="<?php echo stripslashes(strtoupper($data['Item']));?>"><img src="thumb.php?file=<?php echo $image[$i];?>&sizex=180&sizey=130" alt="gallery thumbnail" /></a></li>
        <?php
			}
		}
		?>
		</ul>
       <div>   
      </div>
    </div>
  </div>
  <!-- End contentwarpMiddle -->


      
     
      <!-- End contentwarp -->
    </div> <!-- End contentwarpMiddle -->
      <div class="contentwarpRight">
      <?php include("includes/right_content.php");?>
      </div>
      <!-- End contentwarp -->
    </div>